package com.example.learnvitamio

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.example.learnvitamio.base.BaseActivity
import com.example.learnvitamio.databinding.ActivityMediaPalyerDemoBinding

class MediaPlayerDemo : BaseActivity<ActivityMediaPalyerDemoBinding>() {
    companion object{
        const val MEDIA = "media"
        const val LOCAL_AUDIO = 1
        const val STREAM_AUDIO = 2
        const val RESOURCES_AUDIO = 3
        const val LOCAL_VIDEO = 4
        const val STREAM_VIDEO = 5
        const val RESOURCES_VIDEO = 6
        const val LOCAL_VIDEO_SURFACE = 7
    }

    override fun ActivityMediaPalyerDemoBinding.initBinding() {
        mBinding.localaudio.setOnClickListener {
            val intent = Intent(this@MediaPlayerDemo,MediaPlayerDemoAudio::class.java)
            intent.putExtra(MEDIA, LOCAL_AUDIO)
            startActivity(intent)
        }
        mBinding.localvideo.setOnClickListener {
            val intent = Intent(this@MediaPlayerDemo,MediaPlayerDemoAudio::class.java)
            intent.putExtra(MEDIA, LOCAL_AUDIO)
            startActivity(intent)
        }
        mBinding.localvideoSetsurface.setOnClickListener {
            val intent = Intent(this@MediaPlayerDemo,MediaPlayerDemoAudio::class.java)
            intent.putExtra(MEDIA, LOCAL_AUDIO)
            startActivity(intent)
        }
        mBinding.streamvideo.setOnClickListener {
            val intent = Intent(this@MediaPlayerDemo,MediaPlayerDemoAudio::class.java)
            intent.putExtra(MEDIA, LOCAL_AUDIO)
            startActivity(intent)
        }
//        mBinding.resourcesaudio.setOnClickListener {  }
    }
}